Image decoding device and method thereof using inter-coded predictive encoding code

ABSTRACT

An image encoding device and corresponding decoding device are disclosed for achieving a high rate of compression. The encoding device includes an image conversion module that converts the direction of the images using right-left symmetry mode convention or up-down symmetry mode conversion. Encoding modules are used to encode both the unconverted and converted images. A mode selector module compares the quantity of codes in the encoded unconverted images and the quantity of codes in the encoded converted images, and selects codes that are smaller in the quantity of codes for output.

CLAIM OF PRIORITY

This application is a continuation of application Ser. No. 11/066,169,filed Feb. 28, 2005, now allowed, which claims benefit of Japaneseapplication PCT/JP2004/006169 filed on Apr. 28, 2004, the disclosures ofwhich are incorporated herein by reference.

BACKGROUND

This invention relates to an image encoding device, an image encodingprogram and an image encoding method for encoding images, an imagedecoding device, a decoding program, and a decoding method for decodingencoded images, a medium recording a encoded image encoding stream, anda method of transmitting encoded image data.

As methods of recording large quantities of visual and audio informationas compressed digital data and transmitting them, encoding systemsincluding the Moving Picture Experts Group (MPEG) system have beenformulated, and established as encoding systems of internationalstandards, such as MPEG-1, MPEG-2 and MPEG-4 standards. Systemsprescribed for enhancing the rate of compression include theH.264/Advanced Video Coding (AVC) standard (see Joint Video Team (JVT)of ISO/IEC MPEG 85 ITU-T VCEG: “Text of International Standard of JointVideo Specification”, ITU-T Rec. H264|ISO/IEC 14496-10 Advanced VideoCoding (December, 2003)). These systems have been adopted as encodingsystems for use in digital satellite broadcasting, DVDs, cellulartelephones and digital cameras among others, and are now finding evenmore extensive and familiar use.

Of these encoding systems, the H.264/AVC systems uses, in addition toarithmetic transform encoding techniques using motion compensativeprediction and discrete cosine transform (DCT), a technique known asintra-coded predictive encoding. This technique permits prediction ofthe signal level from an encoded adjoining block in an intra-framewithout having to use any other picture information.

FIG. 3 illustrates the intra-coded predictive encoding. The descriptionhere will refer, by way of example, to block-by-block prediction, thesize of each block being 4×4 pixels, in a raster scanning system ofsequentially scanning a frame rightward and downward from the top left.The signal level of a pixel 304 in a prediction block 303 (the block tobe predicted) is predicted from the signal level of the boundary pixel302 of an already encoded adjoining block 301 (the pixels adjoining theprediction block, out of the pixels of the adjoining block 301, exceptthat a pixel on the lowest line where the block adjoining the predictionblock to the upper right is concerned), and the difference between thepredicted value and the actual value (residual component) is subjectedto arithmetic transform encoding by DCT or otherwise. At this step, apixel 305 of an adjoining block not yet encoded cannot be used forprediction. There are a plurality of directions of prediction (i.e.encoding modes) 306. Residual components resulting from prediction inall the directions are compared, the direction giving the smallestresidual component is selected, and that residual component is subjectedto arithmetic transform encoding. The direction “0:DC” here is the modein which the average signal level of all the boundary pixels is used asthe predictive value.

Incidentally, in block-by-block prediction in which the size of eachblock is 16×16 pixels, intra-coded predictive encoding can also beaccomplished though the directions of prediction are limited.

Inter-coded predictive encoding, though similar to the conventional MPEGsystems, the motion vector of each block is encoded as the differencefrom the upper and left side motion vectors, which are already encoded.

SUMMARY

As stated above, intra-coded predictive encoding cannot be applied topixels of any adjoining block which is not yet encoded. For this reason,a difference in the accuracy of prediction may occur depending on thedirection of prediction 306. For instance, where blocks are scanned by araster scanning system of sequentially scanning a frame rightward anddownward from the top left, the accuracy of predicting rightward anddownward from the top left is high, but that of predicting leftward anddownward from the top right is low. Thus, in an image in which pixelssimilar in signal level consecutively appear rightward and downward fromthe top left (left-to-right sloping image), prediction is easier andaccordingly a high rate of compression can be achieved. However,prediction is more difficult for an image in which pixels similar insignal level consecutively appear leftward and downward from the topright (right-to-left sloping image), and accordingly the rate ofcompression is lower.

Similarly in inter-coded predictive encoding, there is directionaldependence of characteristics of images subjected to raster scanning.Since the motion vector of each block is encoded as the length ofdifference from the motion vectors of the adjoining blocks on the leftand upper sides, the closer the sequence in correlation to the motion inthe rightward and downward direction, the higher the accuracy ofprediction and the higher the efficiency of encoding. Further, as theselection of a context model in entropy encoding also uses informationon the adjoining blocks on the left and upper sides, a similar trend isfound of the accuracy of prediction.

Moreover, as only boundary pixels are used in conventional intra-codedpredictive encoding, there is a problem that consecutive variations insignal level within a block cannot be predicted with a sufficiently highaccuracy. Usually, the signal level of pixels varies in a gentle slope.However, in conventional intra-coded predictive encoding, boundarypixels on a block boundary are extended in prediction (i.e. the pixelsto be predicted are assumed to be the same as the boundary pixels). As aresult, the farther a given pixel from the boundary pixels, the greaterthe residual component and the greater the quantity of codes afterarithmetic transform.

An object of this invention, attempted in view of the problems, is toprovide an image encoding device capable of intra-coded predictionalways in the direction of higher accuracy of prediction without havingto alter the scanning direction by inverting the input image in thevertical or horizontal direction or rotating it at any desired anglebefore performing intra-coded prediction, and an image decoding devicematching this encoding device.

Another object of the invention is to provide an image encoding devicecapable of inter-coded prediction always in the direction of higheraccuracy of prediction without having to alter the scanning direction byinverting the input image in the vertical or horizontal direction orrotating it at any desired angle before performing inter-codedprediction, and an image decoding device matching this encoding device.

Still another object of the invention is to provide an image encodingdevice capable of realizing intra-coded prediction at high accuracyusing not only boundary pixels but also pixels inside the blockaccording to a prescribed interpolation formula when performingintra-coded prediction, and an image decoding device matching thisencoding device.

According to the invention, there is provided an encoding device forencoding signals of images, comprising an image conversion module forconverting the direction of the images, encoding modules for encodingthe images and images converted in the direction, and a mode selectormodule for comparing the quantity of codes in the encoded images and thequantity of codes in the encoded images converted in the direction,selecting codes smaller in the quantity of codes, and outputting theselected codes and a flag for identifying the selected codes.

Also according to the invention, there is provided an encoding devicefor encoding signals of images, comprising an encoding module forcalculating a first difference between information on a first pixel of aprediction area for second pixel which is in a predictive direction fromthe first pixel, encoding the first difference of the prediction area,calculating a predicted value calculated by applying a forwardinterpolation formula to information on a plurality of third pixelswhich are in a predictive direction from the first pixel, calculating asecond difference from the predicted value and encoding the seconddifference of the prediction area; and a mode selector module forcomparing the quantities of codes in the quantities of codes in thefirst and second differences of the prediction areas calculated for aplurality of the predictive directions, selecting codes smallest in thequantity of codes, and outputting the selected codes and a flagindicating which of the predictive directions the first or seconddifference has been calculated for the selected codes.

Therefore according to the invention, it is possible to provide an imageencoding device enhanced in the rate of compression by performingintra-coded prediction and inter-coded prediction always in thedirection of higher accuracy of prediction without having to alter thescanning direction, and an image decoding device matching this encodingdevice.

Also according to the invention, it is possible to provide an imageencoding device enhanced in the rate of compression by performing highlyaccurate intra-coded prediction using pixels inside the block, and animage decoding device matching this encoding device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of the hardware configuration of an imageencoding device, which is a first preferred embodiment of thisinvention;

FIG. 2 is a block diagram of the functions of the image encoding device,which is the first preferred embodiment of the invention;

FIG. 3 illustrates intra-coded predictive encoding;

FIG. 4 illustrates the procedure of image encoding by the firstpreferred embodiment of the invention;

FIG. 5 is a block diagram of the hardware configuration of an imagedecoding device, which is a second preferred embodiment of theinvention;

FIG. 6 is a block diagram of the functions of the image decoding device,which is the second preferred embodiment of the invention;

FIG. 7 illustrates the procedure of image decoding by the secondpreferred embodiment of the invention;

FIG. 8 illustrates an intra-coded predicting method in a third preferredembodiment of the invention;

FIG. 9 is a block diagram of the functions of the intra-coded predictingmodule to which the intra-coded predicting method is applied in thethird preferred embodiment of the invention;

FIG. 10 illustrates the procedure of intra-coded prediction in the thirdpreferred embodiment of the invention;

FIG. 11 illustrates a data recording medium in a fourth preferredembodiment of the invention;

FIG. 12 illustrates a packet in a fifth preferred embodiment of theinvention;

FIG. 13 is a block diagram of the functions of an image encoding device,which is a sixth preferred embodiment of the invention;

FIG. 14 illustrates the procedure of image encoding by the sixthpreferred embodiment of the invention;

FIG. 15 is a block diagram of the functions of an image decoding device,which is a seventh preferred embodiment of the invention; and

FIG. 16 illustrates the procedure of image decoding by the seventhpreferred embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The embodiments and advantages of this invention will be described indetail with the accompanying drawings.

FIG. 1 is a block diagram of the hardware configuration of an imageencoding device, which is a first preferred embodiment of thisinvention.

An image encoding device 101, which is the first embodiment of theinvention, comprises a processor 102, a memory 103, an input interface(input I/F) 104 and an output interface (output I/F) 106 connected topermit communication among one another. The input I/F 104 is connectedto an input device 105, and the output I/F 106 is connected to an outputdevice 107.

The processor 102, intended to process image encoding according to theinvention, codes data received from the input I/F 104 by executing aprogram stored in the memory 103, and delivers the encoded data to theoutput I/F 106.

Programs to be executed by the processor 102 are stored in the memory103. Also, data to be processed by the processor 102 are temporarilystored therein.

The image encoding device 101 may be provided with a plurality each ofprocessors 102 and memories 103. For instance, there may be a processordedicated to execution of only a part of the processing of imageencoding according to the invention. Also, a plurality of processors forperforming the same processing may be provided.

The processor 102 and the memory 103 may be mounted on a single chip.

The input I/F 104 is an interface for receiving from the input device105 image data to be processed by the processor 102.

The input device 105 is a device for entering into the input I/F 104image signals to be processed by the image encoding device 101, and maybe a video camera or a TV tuner, for instance. In this case, the inputI/F 104 may be a video capture card, for example. Further, the inputdevice 105 may be a storage device in which image data not encoded areto be stored. In this case, the input I/F 104 may be an SCSI interface,for instance.

The output I/F 106 is an interface for transmitting to the output device107 data encoded by the processor 102.

The output device 107 is the destination to which data encoded by theimage encoding device 101 are to be supplied, for instance a storagedevice in which encoded image data are to be stored. In this case, theoutput I/F 106 may be an SCSI interface, for instance. Further, theoutput device 107 may be a computer system connected to the output I/F106 via a LAN, IP network or the like (not shown). In this case, theoutput I/F 106 is a network interface. The output device 107 may as wellbe an image receiver device connected to the output I/F 106 via atelephone communication network (not shown). In this case, the outputI/F 106 is a transmitter of telephone signals. Or the output device 107may be a digital TV receiver. In this case, the output I/F 106 is atransmitter of digital TV signals.

The image encoding device 101 may as well be provided with a pluralityeach of input I/Fs 104 and output I/Fs 106, with an input device and anoutput device each of a different type being connected to each input I/F104 and output I/F 106. For instance, the image encoding device 101 mayhave two output I/Fs 106, a hard disk device being connected to one ofthem, and a magneto-optical disk device being connected to the other. Ora hard disk device may be connected to one of them, and a computersystem may be connected to the other via a LAN or the like.

FIG. 2 is a block diagram of the functions of the image encoding device101, which is the first preferred embodiment of the invention.

The image encoding device 101 comprises an original image memory 201, animage converting module 202, an encoding module 203, a mode controlmodule 213 and a mode selector module 214. The original image memory 201here is a partial area of the memory 103, and the image convertingmodule 202, the mode control module 213 and the mode selector module 214are programs stored in the memory 103 and to be executed by theprocessor 102. The encoding module 203 comprises a motion predictingmodule 204, an intra-coded predicting module 205, an arithmetictransform module 206, a quantizing module 207, a coefficient encodingmodule 208, an inverse quantizing module 209 and an inverse arithmetictransform module 210, which are programs to be executed by the processor102, and a decoded image memory 211 and a predictive image memory 212,which are a partial area of the memory 103.

Next will be described the functions of the individual modules of theimage encoding device 101 along the procedure of encoding an image.

The original image memory 201 temporarily buffers the original image tobe encoded. Next, the image converting module 202 processes conversionof the whole or part of the frame of the image acquired from theoriginal image memory 201. Part of the frame in this context may be oneof macro-blocks or blocks of a prescribed size into which the frame isdivided or a prescribed rectangular area. Usually, the unit of encodingis a macro-block.

The image converting module 202 may divide the data having undergoneconversion processing of the whole frame into macro-blocks and transmitthose macro-blocks to the encoding module 203, or subject themacro-blocks into which the frame has been divided to conversionprocessing. Information regarding whether or not conversion processinghas been done is transmitted to the mode control module 213.

The conversion processing performed by the image converting module 202is processing to convert the direction of images. Processing to convertthe direction of images is, for instance, axial symmetry conversion orpoint symmetry conversion. Axial symmetry conversion means, forinstance, right-left symmetry conversion by which the frame is invertedlaterally or up-down symmetry conversion by which the frame is invertedvertically. Point symmetry conversion means, for instance, rotationalconversion by which the frame is rotated. The image converting module202 may combine these modes of conversion. The following descriptionwill refer to, by way of example, a case in which subjecting the wholeimages to right-left symmetry conversion and not subjecting it to suchconversion is compared and what involves a smaller quantity of codes isselected.

The encoding module 203 acquires from the image converting module 202images subjected to right-left symmetry conversion and images notsubjected to such conversion, and sequentially codes each image. Or aplurality of encoding modules 203 may be provided, and each image may beencoded by two encoding modules 203 in parallel. Where a plurality ofencoding modules 203 are provided, the image encoding device 101 isprovided with a plurality of processors 102 dedicated to the executionof programs of the encoding modules 203.

The motion predicting module 204 subjects the images acquired from theimage converting module 202 to inter-frame prediction by using imagesfrom the predictive image memory 212 and the decoded image memory 211,transmits information on motion vectors and the like to the mode controlmodule 213, and transmits to the arithmetic transform module 206 theresidual component of the encoded block obtained by prediction.

The intra-coded predicting module 205 subjects the images acquired fromthe image converting module 202 to intra-coded prediction by usingimages from the decoded image memory 211, transmits information on modesand the like to the mode control module 213, and transmits to thearithmetic transform module 206 the residual component of the encodedblock obtained by prediction.

The arithmetic transform module 206, the quantizing module 207 and thecoefficient encoding module 208 are the same as their respectivecounterparts in conventional encoding devices, and respectively performDCT operation, quantization of conversion coefficients and conversion ofcoefficients into codes. The inverse quantizing module 209 and theinverse arithmetic transform module 210, which also are the same astheir respective counterparts in conventional encoding devices, returnencoded data into image information by inverse conversion, and store theresultant information into the decoded image memory 211 and thepredictive image memory 212.

The mode control module 213 manages the encoding mode in the whole image(frame) and macro-blocks on the way of encoding. Regarding the wholeimage, it holds an encoding process for images having undergoneconversion processing and one for images not having undergone conversionprocessing. Thus it holds items of information referenced for motionprediction (including motion vectors and information on the referenceframe) and information on the intra-coding mode (direction on theintra-coded prediction side) among others with respect to each of thecase in which conversion processing has been performed and that in whichno conversion processing has been performed. Regarding macro-blocks, itholds information as to whether the current macro-block is to undergointra-coding or inter-frame prediction encoding and information relatedto them concerning the intra-coding mode, motion vectors and referenceframes among others. The mode control module 213 transmits these itemsof information to the mode selector module 214.

The mode selector module 214 composes encoded data of images frominformation on encoded data and encoding modes regarding the whole imageand macro-blocks on the way of encoding, and outputs the data socomposed. It compares the overall quantity of codes in the case ofencoding through conversion processing by the image converting module202 with the quantity of codes in the case of encoding withoutconversion processing, and outputs codes of the smaller quantity as astream. Further a flag indicating whether or not conversion processinghas been performed and, where a partial area of an image has beenconverted, positional information on that area, are added to the streamas data.

It is sufficient for the flag indicating whether or not conversionprocessing has been performed to have one bit each for right-leftsymmetry conversion and up-down symmetry conversion. In the case ofrotational conversion, if the number is to be increased by 1 for every90-degree rotation, two bits will be sufficient for expressing a360-degree rotation.

FIG. 4 illustrates the procedure of image encoding by the firstpreferred embodiment of the invention.

First, the image converting module 202 decides on the encoding system(step 401). Thus, it decides on whether to apply conversion processingto the whole frame or macro-block by macro-block. The followingdescription will refer to a case in which the whole frame is to beconverted by way of example. The process of performing conversionprocessing goes advances to step 402 while that of not performingconversion processing goes to step 404.

At step 402, the image converting module 202 converts the input image.Thus the image is subjected frame by frame to right-left symmetryconversion, up-down symmetry conversion, rotational conversion and soforth. Then the sequence advances to step 403.

At step 403 and step 404, the encoding module 203 codes the image. Thisencoding was already described with reference to FIG. 2.

Next, the mode selector module 214 compares the quantities of codes anddecides on the mode (step 405). Thus, as described with reference toFIG. 2, it compares the quantities of codes obtained by encoding betweenprocess of having performed conversion processing and that of not havingperformed conversion processing, and decides to output data of thesmaller quantity of codes.

Then, the mode selector module 214 outputs a code and a flag (step 406).As described with reference to FIG. 2, it outputs as a stream the flagindicating whether or not conversion processing has been performed,positional information on the partial area of an image has beenconverted if any, and the selected encoded data. The processing ofencoding is thereby completed.

FIG. 5 is a block diagram of the hardware configuration of an imagedecoding device, which is a second preferred embodiment of theinvention.

An image decoding device 501, which is the second preferred embodimentof the invention, comprises a processor 502, a memory 503, an inputinterface (input I/F) 504 and an output interface (output I/F) 506,connected to permit communication among one another. The input I/F 504is connected to an input device 505, and the output I/F 506 is connectedto an output device 507.

The processor 502, intended to process image decoding according to theinvention, decodes data received from the input I/F 504 by executing aprogram stored in the memory 503, and delivers the decoded data to theoutput I/F 506.

Programs to be executed by the processor 502 are stored in the memory503. Also, data to be processed by the processor 502 are temporarilystored therein.

The image encoding device 501 may be provided with a plurality each ofprocessors 502 and memories 503. For instance, there may be a processordedicated to execution of only a part of the processing of imagedecoding according to the invention.

The processor 502 and the memory 503 may be mounted on a single chip.

The input I/F 504 is an interface for receiving from the input device505 image data to be processed by the processor 502.

The input device 505 is a device for entering into the input I/F 504encoded data to be processed by the image decoding device 501, and maybe a storage device in which encoded image data are to be stored. Inthis case, the input I/F 504 may be an SCSI interface, for instance.Further, the input device 505 may be a computer system connected to theinput I/F 504 via a LAN, IP network or the like (not shown). In thiscase, the input I/F 504 is a network interface. The input device 505 mayas well be an image data transmitter device connected to the input I/F504 via a telephone communication network (not shown). In this case, theinput I/F 504 is a receiver of telephone signals. Or the input device505 may be a digital TV broadcast station. In this case, the input I/F504 is a digital TV tuner.

The output I/F 506 is an interface for transmitting to the output device507 data decoded by the processor 502.

The output device 507 is the destination to which data decoded by theimage decoding device 501 are to be supplied, for instance a display onwhich images are to be displayed. In this case, the output I/F 506 maybe a video card, for instance. Further, the output device 507 may be astorage device in which decoded data are to be stored in a stream. Inthis case, the output I/F 506 is a SCSI interface.

The image decoding device 501 may as well be provided with a pluralityeach of input I/Fs 504 and output I/Fs 506, with an input device and anoutput device each of a different type being connected to each input I/F504 and output I/F 506. For instance, the image encoding device 501 mayhave two output I/Fs 506, a hard disk device being connected to one ofthem, and an optical disk device being connected to the other. Or a harddisk device may be connected to one of them, and a computer system maybe connected to the other via a LAN or the like.

FIG. 6 is a block diagram of the functions of the image decoding device501, which is the second preferred embodiment of the invention.

The image decoding device 501 comprises a stream analyzing module 601, amode decision module 602, a decoding module 603, an image convertingmodule 610 and a decoded image memory 611. The stream analyzing module601, the mode decision module 602, the decoding module 603 and the imageconverting module 610 here are programs stored in the memory 503 and tobe executed by the processor 502, and the decoded image memory 611 is apartial area of the memory 103. Further, the decoding module 603comprises a motion predicting module 604, an intra-coded predictingmodule 605, a coefficient analyzing module 606, an inverse quantizingmodule 607 and an inverse arithmetic transform module 608, which areprograms to be executed by the processor 502, and a predictive imagememory 609, which is a partial area of the memory 503.

The decoding device 501, which is the second embodiment of theinvention, can decode a stream encoded by the image encoding device 101,which is the first embodiment. Next, the functions of the differentmodules of the image decoding device 501 will be described along theprocedure of decoding the encoded stream.

The stream analyzing module 601 analyzes the data of the inputtedencoded stream, and transmits to the mode decision module 602information on flags and data. The stream analyzing module 601 analyzesthe data of the stream and flags created by the encoding device 101.

Then, the mode decision module 602 controls modes regarding motionprediction, intra-coded prediction and image conversion on the basis ofthe information analyzed by the stream analyzing module 601. If a flagindicating that the image was subjected at the time of encoding toconversion processing such as inversion, rotation or the like isattached to the stream, information on the type of conversion processingperformed (for instance, information on whether or not right-leftsymmetry conversion has been performed) is transmitted to the imageconverting module 610.

The motion predicting module 604 performs inter-frame prediction byusing information including motion vectors transmitted from the modedecision module 602 and images from the predictive image memory 609 andthe decoded image memory 611, and transmits predictive information tothe coefficient analyzing module 606.

The intra-coded predicting module 605 performs intra-coded prediction byusing information including the intra-coding mode transmitted from themode decision module 602 and images from the decoded image memory 611,and transmits predictive information to the coefficient analyzing module606.

The coefficient analyzing module 606, the inverse quantizing module 607and the inverse arithmetic transform module 608 are the same as theirrespective counterparts in conventional decoding devices, andrespectively perform synthesis of predictive information and coefficientinformation, inverse quantization of conversion coefficients and DCToperation.

The image converting module 610 subjects to conversion processing thewhole frame or part of the decoded image in accordance with informationtransmitted from the mode decision module 602. Thus it performsprocessing to undo the conversion processing performed by the imageconverting module 202 of the encoding device 101 shown in FIG. 1 andFIG. 2 above.

The decoded image memory 611 stores decoded images having gone throughconversion processing by the image converting module 610, and transmitsthose images to the output device 507 to have the decoded imagesdisplayed on a screen or supplied to a stream.

FIG. 7 illustrates the procedure of image decoding by the secondpreferred embodiment of the invention.

First, the stream analyzing module 601 and the mode decision module 602analyze the stream and the flag (step 701). Then, the decoding module603 decodes the image (step 702). Next, the image converting module 610converts the decoded image, and stores it into the decoded image memory611 (step 703). Finally, images stored in the decoded image memory 611are outputted for displaying or stream recording (step 704). Theprocessing of decoding is thereby completed. Incidentally, sinceparticulars of the processing by the above-described modules werealready stated with reference to FIG. 6, their detailed description willbe dispensed with here.

The image encoding device 101 of the first embodiment of the inventionand the image decoding device 501 of the second embodiment describedabove may be packaged as the same hardware unit. In this case, theprograms described with reference to FIG. 2 and FIG. 6 are stored in thememory 103 (or the memory 503), wherein the areas described withreference to FIG. 2 and FIG. 6 are secured.

Thus, the first and second embodiments of the invention can respectivelyprovide an image encoding device capable of reducing the quantities ofcodes after encoding (i.e. achieving a higher rate of compression) byperforming intra-coded prediction always in the direction of higheraccuracy of prediction without having to alter the scanning direction,and an image decoding device matching this encoding device. As a result,the quantity of codes can be reduced by about 10% at the maximumcompared with conventional intra-coded prediction. The quantity ofcodes, however, is not reduced always at a constant rate because itvaries with the particulars of the original image.

FIG. 8 illustrates an intra-coded predicting method in a third preferredembodiment of the invention.

This embodiment provides a method which uses, in predicting the signallevel of the pixels of a prediction block 802 not only the signal levelof the boundary pixel but also the signal level of pixels of the wholeof the already encoded adjoining block 801, and is used by theintra-coded predicting modules 205 and 605 of FIG. 2 and FIG. 6,respectively. The “prediction block” here means a block which is theobject of encoding but not yet encoded yet, and the “adjoining block”means an encoded block adjoining the prediction block.

The directions of prediction are shown in 306 in FIG. 3. Although thedescription of this embodiment will limit itself to prediction in onlysome of these directions for the sake of brevity, actual prediction isperformed in all the directions of prediction 306 and the direction inwhich the residual component is the smallest is selected. Prediction inthis context means a procedure, where it refers to encoding, of encodingthe difference (residual component) between the actual signal level ofpixels in the prediction block 802 and a predicted value calculated fromthe signal level of pixels in the adjoining block used for prediction.On the other hand, where it refers to decoding, prediction means aprocedure of obtaining a decoded image by adding a decoded residualcomponent to a predicted value calculated in the same way. The procedureof encoding will be described below.

Any conventional intra-coded predicting method uses boundary pixelsalone. Where, for instance, prediction is to be done in the verticaldirection, prediction is done in the downward direction by using theboundary pixels (pixels of the lowest line) of the adjoining block 801right above the prediction block 802. Thus, the prediction block 802 isdivided into four rows and, from the value of the signal level of eachpixel, the value of the signal level of the boundary pixels borderingabove the row including that pixel is subtracted. Where prediction is tobe done in the horizontal direction, similarly prediction is done in therightward direction by using the boundary pixels (pixels of therightmost line) of the adjoining block bordering the prediction block onthe left. Thus, the prediction block 802 is divided into four rows and,from the signal level of each pixel, the value of the signal level ofthe boundary pixels bordering the row including that pixel on the leftis subtracted. Thus in prediction in either of the directions mentionedabove, the signal level of the pixels of the prediction block ispredicted to be the same as the signal level of the boundary pixels, andthe difference (residual component) between the predicted value and theactual value is calculated.

On the other hand, the intra-coded predicting method provided by thethird preferred embodiment of the invention, is a predicting methodusing composite pixels including not only boundary pixels but alsopixels inside adjoining blocks. The composite pixels here mean pixels ina plurality of blocks used in the prediction of pixels in the predictionblock. Where prediction is to be done in the horizontal direction forinstance, composite pixels constitute one line (803) of the blockadjoining the line to be predicted. In this case, the predicted value iscalculated from the value of the composite pixels 803 by aninterpolation formula, and the values of the pixels of one of theadjoining prediction block are predicted. This prediction uses, forinstance, Newton's forward interpolation formula. By way of example, acase in which the composite pixels of the adjoining block and the pixelsto be predicted of the prediction block are assigned numbers n of 0 to7, the signal level of a pixel n is supposed to be yn, and n=4, 5, 6, 7(uncoded) is to be figured out from n=0, 1, 2, 3 (coded). In thiscalculation, the predicted signal level value yn of the pixel n isobtained by Equation (1).

The residual component is figured by subtracting the predicted value,calculated by Equation (1), from the value of the pixel of theprediction block. If n=7 for instance, the residual component of pixel 7is the remainder of the subtraction of y7 from the actual value of pixel7. Where prediction is to be done diagonally, similarly numbers n (n=0to 7) are assigned to the pixels to be predicted of the prediction blockand the pixels of the adjoining block, which constitute the basis ofprediction, and the predicted value is calculated by Equation (1) (805).If the pixels to be predicted are less than four, the calculation shouldbe done in a more narrowly limited range of n. For instance, if thereare three pixels to be predicted, the range of n should be reduced to 0to 6 (806).y _(n) =y ₀ +nD ₀ +n(n−1)D ₁ +n(n−1)(n−2)D ₂  (1)D ₀ =y ₁ −y ₀D ₁=½(y ₂−2y ₁ +y ₀)D ₂=⅙(y ₃−3y ₂+3y ₁ −y ₀)

Whereas Equation (1) is a formula applicable to a block size of 4×4pixels, the predicting method provided by this embodiment can also beapplied to other block sizes (e.g. 16×16 pixels). Generally regardingpixels numbered from 0 to n, where the values of signal levels of pixelsm+1 to n are to be predicted from the values of known signals of pixels0 to m, the predicted value y can be obtained by Equation 2, wherein nCjis a two-term coefficient.

$\begin{matrix}{{y_{n} = {y_{0} + {\sum\limits_{j = 1}^{m}\;{{{}_{}^{}{}_{}^{}}{\sum\limits_{i = 0}^{j}\;{{{{}_{}^{}{}_{}^{}}\left( {- 1} \right)}^{j - i}y_{i}}}}}}}{{{}_{}^{}{}_{}^{}} = \frac{n!}{{j!}{\left( {n - j} \right)!}}}} & (2)\end{matrix}$

Next, the residual from the conventional predicting method will becompared with that from the predicting method provided by thisembodiment. A signal level 808 according to the conventional predictingmethod is the same as the signal level of pixel 3 (boundary pixel). Onthe other hand, a signal level 809 according to the predicting methodprovided by this embodiment is a value calculated by Equation (1).

For instance, when the signal level of pixels 0 to 3 varies at a certainrate, often the actual signal level 810 of pixels 4 to 7 also varies ata rate close to that level. Thus, the actual signal level 810 is oftenclose to the signal level 809 according to the predicting methodprovided by this embodiment than to the signal level 808 according tothe conventional predicting method. As a result, a residual 812according to the predicting method provided by this embodiment becomessmaller than a residual 811 according to the conventional predictingmethod, and therefore a smaller quantity of codes for this embodiment.Incidentally, though Equations (1) and (2) use the signal level of allthe known pixels for prediction, prediction is also possible by usingthe signal level of only some of the pixels.

To add, the method of least squares can as well be used for thisembodiment of the invention. In this case, a linear equation inferredfrom a known signal level by the method of least squares is used. Forinstance, when the signal level yn of pixel n at n=4, 5, 6, 7 is to beobtained on the basis of the known signal level yn of pixel n at n=0, 1,2, 3 as in the above-described case, Equation (3) is used. Here, mrepresents the number of pixels which is the basis of prediction, andm=4 holds in this example.

$\begin{matrix}{{y_{n} = {{an} + b}}{a = \frac{\sum\limits_{i = 0}^{m - 1}\;{\left( {y_{i} - \overset{\_}{y}} \right)\left( {i - \overset{\_}{n}} \right)}}{\sum\limits_{i = 0}^{m - 1}\;\left( {i - \overset{\_}{n}} \right)^{2}}}{{b = {\overset{\_}{y} - {a\overset{\_}{n}}}},{\overset{\_}{y} = {\frac{1}{m}{\sum\limits_{i = 0}^{m - 1}\; y_{i}}}}}{\overset{\_}{n} = {\frac{1}{m}{\sum\limits_{i = 0}^{m - 1}\; i}}}} & (3)\end{matrix}$

FIG. 9 is a block diagram of the functions of the intra-coded predictingmodule 205 to which the intra-coded predicting method is applied in thethird preferred embodiment of the invention.

The intra-coded predicting module 205 in this embodiment determines theintra-coding mode of the prediction block (i.e. the direction ofprediction 306 of FIG. 3 above) on the basis of information 907 on thesignal level of the already encoded adjoining block, performs predictionprocessing, and transmits the encoding mode and information 906 on theresidual component to the mode control module 213 and the arithmetictransform module 206.

The intra-coded predicting module 205 comprises an intra-codedprediction control module 901 and a plurality of predicting modules eachmatching one or another of the encoding modes. This plurality ofpredicting modules are classified into what performs conventionalprediction using boundary pixels and what predicts by this embodimentusing composite pixels, each including what predicts in each of thedirections of prediction 306 shown in FIG. 3.

For the sake of brevity of description, FIG. 9 shows only a verticaldirection boundary pixel mode predicting module 902 which predicts inthe vertical direction (“0:Vertical” in FIG. 2) using boundary pixels, ahorizontal direction boundary pixel mode predicting module 903 whichpredicts in the horizontal direction (“1:Horizontal” in FIG. 2) usingboundary pixels, a vertical direction composite pixel mode predictingmodule 904 which predicts in the vertical direction using compositepixels, and a horizontal direction composite pixel mode predictingmodule 905 which predicts in the horizontal direction using compositepixels, but actually a predicting module using boundary pixels and apredicting module using composite pixels are provided for each of theother directions of prediction 306 in FIG. 2.

The intra-coded prediction control module 901 manages the intra-codedpredicting method. Thus it checks whether or not blocks adjoining theprediction block can be used, and controls information for intra-codedprediction.

Each of the mode predicting modules 902 to 905 predicts the signal levelof pixels of the prediction block from the signal level of pixels ofadjoining blocks, and calculates residual components relative to thesignal level of actual pixels. Next, information on the mode in whichthe calculated residual component is the smallest is transmitted to themode control module 213, and the residual component calculated in thatmode is transmitted to the arithmetic transform module 206.

The vertical direction boundary pixel mode predicting module 902predicts in the downward direction by using the boundary pixels of theadjoining block above the prediction block. The horizontal directionboundary pixel mode predicting module 903 predicts rightward by usingthe boundary pixels of the adjoining block to the left of the predictionblock.

The vertical direction composite pixel mode predicting module 904 andthe horizontal direction composite pixel mode predicting module 905perform intra-coded prediction by using composite pixels of thisembodiment. The vertical direction composite pixel mode predictingmodule 904 calculates the predicted value of the signal level byEquation (1) or Equation (2) by using composite pixels of the adjoiningblock above the prediction block (i.e. boundary pixels and insidepixels) to figure out residual components relative to the actual signallevel. The horizontal direction composite pixel mode predicting module905 calculates the predicted value of the signal level by Equation (1)or Equation (2) by using composite pixels of the adjoining block to theleft of the prediction block to figure out residual components relativeto the actual signal level.

FIG. 10 illustrates the procedure of intra-coded prediction in the thirdpreferred embodiment of the invention.

First, the intra-coded prediction control module 901 checks theintra-coded prediction mode (step 1001). Thus, it decides whether or notthe pixels of the adjoining blocks can be used and, on the basis of theresult of that decision, specifies pixels to be used for prediction inthe applicable directions of prediction 306 and each of the directionsof prediction 306.

Next, intra-coded prediction is performed regarding the directions ofprediction 306 to which the mode predicting modules 902 to 905 areapplicable. In the procedure of FIG. 10, prediction using conventionalboundary pixels and prediction using the composite pixels of thisembodiment are performed both in the vertical direction and in thehorizontal direction (steps 1002 to 1005).

Then, the optimal intra-coded prediction mode is selected on the basisof prediction results from steps 1002 to 1005 (step 1006). The total ofresidual components relative to different pixels in each mode iscalculated as a result of prediction at steps 1002 to 1005. As thesmaller this total, the smaller the quantity of codes after encoding,the mode which gives the smallest total of residual components isselected as the optimal mode. Next, the selected residual components aretransmitted to the arithmetic transform module 206, and information onthe selected mode is transmitted to the mode control module 213. Foreven more accurate decision, the mode selector module 214 may selectedas the optimal mode the mode which gives the smallest total of residualcomponents after arithmetic transform by the arithmetic transform module206. Processing of intra-coded prediction is completed hereupon.

The mode selector module 214 adds to the stream of codes to be outputteda flag indicating the selected optimal mode.

To add, though prediction in only the vertical direction and thehorizontal direction is included in the procedure illustrated in FIG. 10for the sake of brevity of description, actually prediction is performedin every direction of prediction which the intra-coded predictioncontrol module 901 has determined to be applicable, and the optimal modeis selected from the result.

While the image encoding device 101 was described with reference to FIG.9 and FIG. 10, the intra-coded predicting method provided by thisembodiment can be similarly applied to the image decoding device 501. Inthis case, the intra-coded predicting module 605 is provided with, inaddition to the conventional boundary pixel mode predicting module, acomposite pixel mode predicting module for each of the directions ofprediction 306. By performing intra-coded prediction in the predictingmode for the inputted encoded data, an image decoding device 501matching the intra-coded predicting method provided by this embodimentcan be realized.

Thus, the mode decision module 602 references the flag attached to theimage stream to be decoded, and determines the intra-coded predictionmode selected at the time of encoding the image. Next, the intra-codedpredicting module 605 performs prediction in the determined intra-codedprediction mode and decodes the image. For instance, if the image to bedecoded is encoded in the boundary pixel mode in the rightwarddirection, the signal level of pixels of the prediction block will bepredicted to be the same as that of the boundary pixels of the adjoiningblock to the left of the prediction block, and decoding will beperformed on that basis. Or if the image to be decoded is encoded in thecomposite pixel mode in the rightward direction for instance, thepredicted value of the signal level of the pixels of the predictionblock is calculated by applying Equation (1) to the composite pixels ofthe adjoining block to the left of the prediction block, and decodingwill be performed on that basis.

The third embodiment of the invention so far described can provide animage encoding device can reduce the quantity of codes after encoding(i.e. raise the rate of compression) by performing highly accurateintra-coded prediction by using composite pixels (pixels inside theblock), and an image decoding device matching this encoding device.

FIG. 11 illustrates a data recording medium in a fourth preferredembodiment of the invention.

A data recording medium 1101 is a recording medium for use where theoutput device 107 or the input device 505 is a storage device, and maybe a magnetic disk for instance. Encoded data created by the imageencoding device 101 of the first embodiment of the invention arerecorded on the data recording medium 1101 as a data stream 1102. Thedata stream 1102 is recorded as an encoded stream conforming to acertain grammar. An example of the H.264/AVC standard will be describedbelow.

According to H.264/AVC, a stream comprises a sequence parameter set1103, a picture parameter set 1104 and slices 1105, 1106 and 1107. Thefollowing description will refer, by way of example, to a case in whichone image (frame) is stored in each slice.

In a stream where the whole frame has been subjected to conversionprocessing including right-left symmetry conversion, up-down symmetryconversion or rotational conversion, a slice header 1108 is recorded atthe leading edge of the slice 1105, and information 1109 on a flag andthe like related to conversion processing is stored within the sliceheader 1108. The contents of this information include a flag indicatingwhether or not conversion processing has been performed and, where apartial area of the image has been converted, positional information andthe like on that partial area. For the flag indicating whether or notconversion processing has been performed, one bit will be sufficient foreach of right-left symmetry conversion and up-down symmetry conversion.In rotational conversion, if the number is to be increased by 1 forevery 90-degree rotation clockwise, two bits will be sufficient forexpressing a 360-degree rotation. The positional information concerningthe area in which conversion processing has taken place includes suchitems as abscissas and ordinates in the image, its width and height.Where conversion processing is to be performed macro-block bymacro-block, these items of information can be stored in the part wherethe flag of each macro-block is to be recorded in place of a sliceheader.

Regarding the flag indicating whether or not conversion processing hasbeen performed, flags for indicating such information as conversionprocessing performed only on the intra-coded prediction frame togetherwith that, conversion processing performed also on the inter-codedprediction frame, or conversion processing performed ingroup-of-pictures (GOP) units may also be stored. To add, an embodimentin which conversion is processed on the inter-coded prediction framewill be described afterwards.

Further, where the intra-coded predicting method provided by the thirdembodiment of the invention is to be applied, a new mode in whichcomposite pixels are used in the encoded stream of the H.264/AVCstandard is added. In this case, numerical values representing the newmode are added to the information 1109 on the conventional flags and thelike, and stored. Regarding the form of expressing the new mode may bethe addition of bits indicating the use of composite pixels or theallocation of numerical values where mode prediction using compositepixels is performed.

FIG. 12 illustrates a packet in a fifth preferred embodiment of theinvention.

FIG. 12 shows, by way of example, the procedure of generating from thedata stream 1102 of FIG. 11 an IP packet to be transmitted by the outputI/F 106 of the image encoding device 101 to an IP network.

First, the data stream 1102 is divided into TCP segments 1201 to 1203 ofa prescribed size, to which TCP headers 1204 to 1206 are respectivelyassigned. FIG. 12 shows an example in which one segment is generatedfrom one slice. In this case, the slice header 1108 contained in eachslice is also included in a segment. As described with reference to FIG.11, the information 1109 on the flags and the like related to conversionprocessing is stored inside the slice header 1108. Though descriptionwith reference to FIG. 12 is dispensed with, segments are also generatedsimilarly in the slices 1107 onward.

Then, each segment is divided into IP packets of a prescribed size, eachwith an IP header. For instance, the segment 1202 is divided into IPpackets 1207 and 1208 of a prescribed size, to which IP headers 1209 and1210 are respectively assigned. Though only the IP packets 1207 and 1208generated from part of the segment 1202 are shown here, IP packets aresimilarly generated from the whole segment 1202 as well. Further, thoughdescription with reference to FIG. 12 is dispensed with, other segments1201 onward are similarly divided to generate IP packets.

The IP packets 1209 and so forth are generated by the output I/F 106 ofthe image encoding device 101 for instance, and transmitted to theoutput device 107 via the IP network (not shown).

Also, the IP packets 1209 and so forth may as well be transmitted from apacket transmitter device (not shown) which is equipped with a storagedevice, wherein the data stream 1102 is stored and an output interfacefor generating the IP packets 1209 and so forth from the data stream1102 and transmitting them, but has no image encoding function.

In the same way as illustrated in FIG. 12, the image encoding device 101or the packet transmitter device may as well wireless packets from thedata stream 1102, and transmit them to the output device 107 via awireless packet communication network.

FIG. 13 is a block diagram of the functions of the image encoding device101, which is a sixth preferred embodiment of the invention. This shows,regarding the image encoding device of the first embodiment of theinvention illustrated in FIG. 2, a case in which conversion processingis also performed in inter-coded prediction.

The image encoding device 101 comprises an original image memory 201, animage converting module 202, an encoding module 1302, a mode controlmodule 213 and a mode selector module 214. The original image memory201, the image converting module 202, the mode control module 213 andthe mode selector module 214 here are the same as their respectivecounterparts in the image encoding device of the first embodiment. Adistinct feature of the image encoding device of the sixth embodiment isthat it has in the encoding module 1302 an image conversion module 1301for inversely converting a predictive image controlled by the modecontrol module 213.

The conversion processing performed by the image conversion module 1301,though similar to the processing done by the image converting module202, has as its object a reference frame. Thus, the image conversionmodule 1301 executes, for instance, axial symmetry conversion or pointsymmetry conversion of the reference frame. The axial symmetryconversion means, for instance, right-left symmetry conversion by whichthe reference frame is inverted laterally or up-down symmetry conversionby which the reference frame is inverted vertically. Point symmetryconversion means, for instance, rotational conversion by which thereference frame is rotated. The image converting module 1301 may combinethese modes of conversion.

To add, the image encoding device 101 of this embodiment is providedwith two image converting modules 202 and 1301 as shown in FIG. 13.However, they may be physically a single image conversion module. Thus,the image encoding device 101 may be provided with a single imageconversion module, which is enabled to serve as either the imageconverting module 202 or the image conversion module 1301 by switchingits input/output.

FIG. 14 illustrates the procedure of image encoding by the sixthpreferred embodiment of the invention. This shows, regarding the imageencoding procedure of the first embodiment of the invention illustratedin FIG. 4, a case in which conversion processing is also performed ininter-coded prediction.

This procedure differs from image encoding by the first embodiment inthat, before encoding the image having undergone right-left symmetryconversion at step 403, the image conversion module 1301 performsconversion of the reference image already at step 1401 in accordancewith information transmitted to the mode control module 213 as towhether or not conversion processing has been performed. The method ofimage conversion is the same as the method of conversion at step 402,and the particulars of processing are the same as those shown in FIG.13.

In this way, the image converting modules 202 and 1301 performconversion processing to code in the same direction the frame to beencoded and stored into the original image memory 201 and the referenceframe to be stored into the predictive image memory 212. Processingincluding motion prediction in the inter-coded prediction can be thesame as in the conventional system. In this embodiment as well, a casein which the whole image is subjected to right-left symmetry conversionand a case in which it is not are compared and what involves a smallerquantity of codes for picture quality of about the same level isselected, data of higher encoding efficiency can be used.

FIG. 15 is a block diagram of the functions of an image decoding device501, which is a seventh preferred embodiment of the invention. Thisshows, regarding the image decoding device of the second embodiment ofthe invention illustrated in FIG. 6, a case in which conversionprocessing is also performed in inter-coded prediction.

The image decoding device 501 comprises a stream analyzing module 601, amode decision module 602, a decoding module 1502, an image convertingmodule 610 and an decoded image memory 611. The stream analyzing module601, the mode decision module 602, the image converting module 610 andthe decoded image memory 611 are the same as their respectivecounterparts in the image decoding device of the second embodiment. Adistinct feature of the image decoding device of the seventh embodimentis that the decoding module 1502 has within it an image conversionmodule 1501 for inversely converting a predictive image (referenceframe) controlled by the mode decision module 602. Conversion processingperformed by the image conversion module 1501 is the same as that by theimage converting module 610 described above.

In the decoding of inter-coded prediction according to the invention,when the mode decision module 602 detects an inversion flag, the imageconverting module 610 and the image conversion module 1501 within thedecoding module are instructed to perform conversion processing and,after the reference frame is processed for inversion, the current frameis subjected to inter-coded prediction and decoding, followed by theinversion of the finished image and its outputting.

To add, the image decoding device 501 of this embodiment is providedwith two image converting modules 610 and 1501 as shown in FIG. 15.However, they may be physically a single image conversion module. Thus,the image decoding device 501 may be provided with a single imageconversion module, which is enabled to serve as either the imageconverting module 610 or the image conversion module 1501 by switchingits input/output.

FIG. 16 illustrates the procedure of image decoding by the seventhpreferred embodiment of the invention. This shows, regarding the imagedecoding procedure of the second embodiment of the invention illustratedin FIG. 7, a case in which conversion processing is also performed ininter-coded prediction.

This procedure differs from image decoding by the second embodiment inthat, before decoding the image at step 702, the reference frame isconverted at step 1601. The method of image conversion is the same asthe method of conversion at step 703, and the particulars of processingare the same as those shown in FIG. 15.

Thus, the sixth and seventh embodiments of the invention canrespectively provide an image encoding device capable of reducing thequantities of codes after encoding (i.e. achieving a higher rate ofcompression) by performing inter-coded prediction always in thedirection of higher accuracy of prediction without having to alter thescanning direction, and an image decoding device matching this encodingdevice. As a result, the quantity of codes can be reduced by about 10%compared with conventional intra-coded prediction.

To add, this invention is applicable to image encoding devices, imagedecoding devices and the like conforming to not only H.264/AVC but alsovarious other standards.

This invention can be utilized in the recording and transmission ofimage data, and contributes to reducing the recording capacityrequirement and enhancing the transmission speed by improving the rateof compression and curtailing the quantity of data. For instance, theinvention can be used in video recorders and video players using a harddisk or a DVD. The invention can also be utilized in image distributionservices using a wired or wireless communication network, includingcellular telephones and television broadcasting. Furthermore, theinvention can be used in TV telephone and TV conference systems.

What is claimed is:
 1. A decoding method for decoding a signal of anintra-coded image, the decoding method comprising: a determination stepof determining whether an partial area of the image has been convertedin an up-down symmetry conversion mode to flip the partial area of theimage vertically or in a right-left symmetry conversion mode to flip thepartial area of the image horizontally with reference to informationsent together with the signal of the image; and a decoded image creationstep of creating a decoded image with executing conversion associatedwith a conversion mode determined in the determination step afterintra-coded predicting, wherein the information includes informationindicating a direction of the flip of the partial area of the image andinformation indicating a position of the flipped partial area.